<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/24
 * Time: 14:57
 */
namespace app\common\lib;
class Time{
    /**
     * redis保存时间
     * @param int $type
     * @return float|int
     */
    public static function userLoginExpiresTime($type=2)//1代表七天2代表30天
    {
        $type = !in_array($type,[1,2])? 2:$type;
        if($type==1){
            $day = $type * 7;
        }elseif($type ==2){
            $day = $type * 30;
        }
        return $day * 24 * 3600;
    }
}